package com.example.homework.db.daos

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.example.homework.db.tables.Photos
import kotlinx.coroutines.flow.Flow

@Dao
interface PhotoDao {
    @Query("select * from photos")
    fun getAll(): Flow<List<Photos>>

    @Insert
    suspend fun add(photo: Photos)
}